<?php
namespace c\link;

/**
 * 菜单
 * 
 * 制作:  叶风
 * Qq:    355007778
 * Email: ye.fn@163.com
 *
 */
class nav extends \control
{   
    use \m\tree_g;
    
    var $table = 'link';

    function findForMark($str, $l=0)
    {
        $pid = $this->mark_ids($str);
        if (!$pid)
            return array();
        
        return $this->getParent($pid, $l); 
    }
    
    
    // 标识的ids
	function mark_ids($str)
	{
        $str = '##'.$this->db->escape($str);
		$r = $this->db->getCol($this->table, 'id',"url='$str'");
		return implode(',', $r);
	}
}
